//
//  ViewController.swift
//  PayAlertView
//
//  Created by Pro on 2018/2/2.
//  Copyright © 2018年 Pro. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        self.view.backgroundColor = UIColor.white

        let myAlert = PayWaysAlertView(frame: CGRect(x: 0 , y: 0, width: UIScreen.main.bounds.width , height: UIScreen.main.bounds.height))
        
        myAlert.ButtonCallBack = {(type) -> () in
            switch type {
            case 1:
                print("微信支付")
                myAlert.removeFromSuperview()
            case 2:
                print("支付宝支付")
                myAlert.removeFromSuperview()
            case 3:
                print("余额支付")
                myAlert.removeFromSuperview()
            default:
                print("点击了关闭")
                myAlert.removeFromSuperview()
            }

        }
   
        
        self.view.addSubview(myAlert)
}

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

